function AB= Coeffi_AB(s,p)
a= sym('a',[1 s+1]);
b= sym('b',[1 s+1]);

%AB_a
for i=1:s-1
    a(i)=0;
end
a(s)=-1;
a(s+1)=1;

%AB_b
b(s+1)=0;

equ(1)=sum(a);

 for i=1:p
     equ(i+1)=0;
        for m=0:s
            equ(i+1)=equ(i+1)+a(m+1)*(m^i)/factorial(i)-(b(m+1)*(m^(i-1))/factorial(i-1));
        end
     condition(i)= equ(i+1)==0;
 end
 
AB=solve(condition);
end

